<?php
class VIEW{

	public static $view;

	public static function init($viewtype, $config){
		self::$view = new $viewtype;
		/*$smarty->left_delimiter = "{";//左定界符
		$smarty->right_delimiter = "}";//右定界符
		$smarty->template_dir = "tpl";//html模板地址
		$smarty->compile_dir = "template_c";//模板编译生成的文件
		$smarty->cache_dir = "cache";//缓存*/
		foreach ($config as $key => $value) {
			self::$view->$key = $value;
		}
	}

	public static function assign($date){
		foreach ($date as $key => $value) {
			self::$view->assign($key, $value);
		}
	}

	public static function display($template){
		return self::$view->display($template);
	}
}

?>